package no.ntnu.fp.gui.listeners;

import no.ntnu.fp.gui.events.AcceptNoticeEvent;
import no.ntnu.fp.services.NoticeService;

public class AcceptNoticeListener implements GuiListener<AcceptNoticeEvent> {

	private final NoticeService noticeService;
	
	public AcceptNoticeListener(NoticeService noticeService) {
		this.noticeService = noticeService;
	}

	@Override
	public void handleEvent(AcceptNoticeEvent evt) {
		noticeService.acceptNotice(evt.getNotice());
	}

	@Override
	public boolean isLongRunningListener() {
		return false;
	}

}
